package com.zhuge_new.Base

import android.app.Activity
import com.maning.mndialoglibrary.MToast
import com.zhuge_new.untils.PreferencesUtils

/**
 * @@赵 2018-09-07.
 * 简化存入取出，toast显示
 */

inline fun Activity.toast(text: CharSequence) = MToast.makeTextShort(this, text).show()

inline fun Activity.getString(key: String): String = PreferencesUtils.getString(this, key, "")

inline fun Activity.getString(key: String, defaultValue: String): String = PreferencesUtils.getString(this, key, defaultValue)

inline fun Activity.putString(key: String, vaule: String) = PreferencesUtils.putString(this, key, vaule)
